Integrand size = 23, antiderivative size = 269 \[ \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx=\frac {a^3 \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {3 a^3 \cos ^2(e+f x)^{\frac {1+p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+p}{2},\frac {2+p}{2},\frac {4+p}{2},\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)}+\frac {a^3 \cos ^2(e+f x)^{\frac {1+p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+p}{2},\frac {4+p}{2},\frac {6+p}{2},\sin ^2(e+f x)\right ) \sin ^3(e+f x) (g \tan (e+f x))^{1+p}}{f g (4+p)}+\frac {3 a^3 \operatorname {Hypergeometric2F1}\left (2,\frac {3+p}{2},\frac {5+p}{2},-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{3+p}}{f g^3 (3+p)} \]
a^3*hypergeom([1, 1/2+1/2*p],[3/2+1/2*p],-tan(f*x+e)^2)*(g*tan(f*x+e))^(p+ 1)/f/g/(p+1)+3*a^3*(cos(f*x+e)^2)^(1/2+1/2*p)*hypergeom([1+1/2*p, 1/2+1/2* p],[2+1/2*p],sin(f*x+e)^2)*sin(f*x+e)*(g*tan(f*x+e))^(p+1)/f/g/(2+p)+a^3*( cos(f*x+e)^2)^(1/2+1/2*p)*hypergeom([2+1/2*p, 1/2+1/2*p],[3+1/2*p],sin(f*x +e)^2)*sin(f*x+e)^3*(g*tan(f*x+e))^(p+1)/f/g/(4+p)+3*a^3*hypergeom([2, 3/2 +1/2*p],[5/2+1/2*p],-tan(f*x+e)^2)*(g*tan(f*x+e))^(3+p)/f/g^3/(3+p)
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 22.05 (sec) , antiderivative size = 4715, normalized size of antiderivative = 17.53 \[ \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx=\text {Result too large to show} \]
(4*(3 + p)*AppellF1[(1 + p)/2, p, 4, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[( e + f*x)/2]^2]*Cos[(e + f*x)/2]^9*Sin[(e + f*x)/2]*(a + a*Sin[e + f*x])^3* (g*Tan[e + f*x])^p)/(f*(1 + p)*(2*(4*AppellF1[(3 + p)/2, p, 5, (5 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - p*AppellF1[(3 + p)/2, 1 + p, 4, (5 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*(-1 + Cos[e + f*x]) + (3 + p)*AppellF1[(1 + p)/2, p, 4, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*(1 + Cos[e + f*x]))*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^6) + (24*(4 + p)*AppellF1[1 + p/2, p, 4, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[( e + f*x)/2]^2]*Cos[(e + f*x)/2]^8*Sin[(e + f*x)/2]^2*(a + a*Sin[e + f*x])^ 3*(g*Tan[e + f*x])^p)/(f*(2 + p)*(2*(4*AppellF1[2 + p/2, p, 5, 3 + p/2, Ta n[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - p*AppellF1[2 + p/2, 1 + p, 4, 3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*(-1 + Cos[e + f*x]) + (4 + p)*AppellF1[1 + p/2, p, 4, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2] ^2]*(1 + Cos[e + f*x]))*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^6) + (60*(Ap pellF1[(1 + p)/2, p, 3, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2 ] - AppellF1[(1 + p)/2, p, 4, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x )/2]^2])*Cos[(e + f*x)/2]^5*Sin[(e + f*x)/2]^3*(a + a*Sin[e + f*x])^3*(g*T an[e + f*x])^p)/(f*(1 + p)*(2*AppellF1[(1 + p)/2, p, 3, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - ((-2*(3*AppellF1[(3 + p)/2, p, 4, (5 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - 4*AppellF1[(3 + p)/2,...
Time = 0.61 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 3189, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (e+f x)+a)^3 (g \tan (e+f x))^p \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^3 (g \tan (e+f x))^pdx\) |
\(\Big \downarrow \) 3189 |
\(\displaystyle \int \left (a^3 (g \tan (e+f x))^p+a^3 \sin ^3(e+f x) (g \tan (e+f x))^p+3 a^3 \sin ^2(e+f x) (g \tan (e+f x))^p+3 a^3 \sin (e+f x) (g \tan (e+f x))^p\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 a^3 (g \tan (e+f x))^{p+3} \operatorname {Hypergeometric2F1}\left (2,\frac {p+3}{2},\frac {p+5}{2},-\tan ^2(e+f x)\right )}{f g^3 (p+3)}+\frac {a^3 (g \tan (e+f x))^{p+1} \operatorname {Hypergeometric2F1}\left (1,\frac {p+1}{2},\frac {p+3}{2},-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac {3 a^3 \sin (e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \operatorname {Hypergeometric2F1}\left (\frac {p+1}{2},\frac {p+2}{2},\frac {p+4}{2},\sin ^2(e+f x)\right )}{f g (p+2)}+\frac {a^3 \sin ^3(e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \operatorname {Hypergeometric2F1}\left (\frac {p+1}{2},\frac {p+4}{2},\frac {p+6}{2},\sin ^2(e+f x)\right )}{f g (p+4)}\) |
(a^3*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p)) + (3*a^3*(Cos[e + f*x]^2)^((1 + p)/2)*Hyper geometric2F1[(1 + p)/2, (2 + p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sin[e + f*x] *(g*Tan[e + f*x])^(1 + p))/(f*g*(2 + p)) + (a^3*(Cos[e + f*x]^2)^((1 + p)/ 2)*Hypergeometric2F1[(1 + p)/2, (4 + p)/2, (6 + p)/2, Sin[e + f*x]^2]*Sin[ e + f*x]^3*(g*Tan[e + f*x])^(1 + p))/(f*g*(4 + p)) + (3*a^3*Hypergeometric 2F1[2, (3 + p)/2, (5 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(3 + p))/(f *g^3*(3 + p))
3.2.23.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( x_)])^(p_.), x_Symbol] :> Int[ExpandIntegrand[(g*Tan[e + f*x])^p, (a + b*Si n[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
\[\int \left (a +a \sin \left (f x +e \right )\right )^{3} \left (g \tan \left (f x +e \right )\right )^{p}d x\]
\[ \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
integral(-(3*a^3*cos(f*x + e)^2 - 4*a^3 + (a^3*cos(f*x + e)^2 - 4*a^3)*sin (f*x + e))*(g*tan(f*x + e))^p, x)
\[ \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx=a^{3} \left (\int \left (g \tan {\left (e + f x \right )}\right )^{p}\, dx + \int 3 \left (g \tan {\left (e + f x \right )}\right )^{p} \sin {\left (e + f x \right )}\, dx + \int 3 \left (g \tan {\left (e + f x \right )}\right )^{p} \sin ^{2}{\left (e + f x \right )}\, dx + \int \left (g \tan {\left (e + f x \right )}\right )^{p} \sin ^{3}{\left (e + f x \right )}\, dx\right ) \]
a**3*(Integral((g*tan(e + f*x))**p, x) + Integral(3*(g*tan(e + f*x))**p*si n(e + f*x), x) + Integral(3*(g*tan(e + f*x))**p*sin(e + f*x)**2, x) + Inte gral((g*tan(e + f*x))**p*sin(e + f*x)**3, x))
\[ \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
\[ \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
Timed out. \[ \int (a+a \sin (e+f x))^3 (g \tan (e+f x))^p \, dx=\int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^3 \,d x \]